home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Languguage OS 2
/
Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO
/
a_utils
/
perl
/
prlbkxmp.lha
/
ch5
/
caseassoc
< prev
next >
Wrap
Text File
|
1991-01-08
|
360b
|
21 lines
sub case {
local(*assoc,$_) = @_;
for (split(/\n/)) {
/^(\S+)\s+(.*)/;
for (eval $1) {
$assoc{$_} = $2;
}
}
}
&case(*_V_A_R_I_A_B_L_E,<<'ENDCASE');
_R_A_N_G_E _A_C_T_I_O_N
_R_A_N_G_E _A_C_T_I_O_N
...
_R_A_N_G_E _A_C_T_I_O_N
ENDCASE
...
eval _$_V_A_R_I_A_B_L_E{_S_E_L_E_C_T_O_R};